home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / mailwa10.zip / MAILWAIT.DOC < prev    next >
Text File  |  1989-03-11  |  19KB  |  463 lines

  1.  
  2.                                 MAILWAIT Version 1.0
  3.  
  4.     MAILWAIT 1.0  An RBBS Message Base & ECHO Mail Utility      (03/11/89)
  5.  
  6.     Written By : Mike Zakharoff
  7.     Origin     : INTERSTATE BBS NETWORK,  Seattle WA
  8.     FidoNet    : (1:343/36)   (206) 631-3231 (PCPable! WASEA/1200/2400)
  9.  
  10.     -----------------------------------------------------------------------
  11.  
  12.                                     PURPOSE
  13.  
  14.     MAILWAIT was developed to allow RBBS Sysops to have total control  over
  15.     the  'mail waiting bit'  located in an RBBS USER file.   MAILWAIT  will
  16.     reset  the  mailwaiting  bit  so that when a user  logs  onto  an  RBBS
  17.     bulletin board,  he/she will be notified if messages have been left  to
  18.     him/her.  Here is a summary of MAILWAIT's General features:
  19.  
  20.        1) Match on NEW -or- NEW & OLD mail to the user
  21.        2) Match on mail TO -or- TO & FROM the user
  22.        3) Will Change Messages with sysops REAL NAME to 'SYSOP'
  23.        4) Will maintain a log file
  24.        5) Will RESET (set to 'no') all mailwaiting bits (optionally)
  25.        6) Will ONLY process message bases which have CHANGED
  26.        7) Allows operation using a 'command file'.
  27.  
  28.     In addition,  MAILWAIT accomplishes some message base maintenance tasks
  29.     associated with FidoNet Echo messages and RBBSMAIL such as:
  30.  
  31.        1) Will only select messages not already scanned by RBBSMAIL
  32.        2) Will clean-up the 'Subject Field' of redundant 'RE:'
  33.  
  34.     In order to accomplish this,  a corresponding MESSAGE & USER file  must
  35.     be specified and analyzed.
  36.     ----------------------------------------------------------------------
  37.  
  38.                                   ASSUMPTIONS
  39.  
  40.     NOTE: This document ASSUMES the following:
  41.  
  42.           1) You have an operating RBBS bulletin board
  43.           2) You are connected to FidoNet with a Node Number
  44.           3) You are using a front end mailer (Binkley SeaDog Dutchie)
  45.           4) You are using RBBSMAIL to import/export messages
  46.  
  47.     While  MAILWAIT  was  designed specifically for  solving  some  of  the
  48.     problems associated with FidoNet Echomail,  it can also do a great  job
  49.     of maintaining RBBS systems *not* connected to FidoNet.  The batch file
  50.     examples are shown using a front end mailer (Binkley Etc.),  however  a
  51.     Non-FidoNet  system  could use their 'system  maintenance'  batch  file
  52.     instead  of  the  shown  examples.  The author  assumes  that  you  are
  53.     connected to FidoNet.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                       PAGE: 1
  65.  
  66.  
  67.  
  68.                                 MAILWAIT Version 1.0
  69.  
  70.     -----------------------------------------------------------------------
  71.  
  72.                                    OPERATION
  73.  
  74.     Basically,  there  are  TWO modes of operation.   DOS/BATCH  mode  -or-
  75.     command file mode.  Whenever you execute MAILWAIT (for both modes), you
  76.     must specify at least the following information:
  77.  
  78.     REQUIRED INPUTS:
  79.     ----------------
  80.        1) The USER file to process ---------------------> /USR:xxx
  81.        2) The MESSAGE file to process ------------------> /MSG:xxx
  82.        3) The SECURITY LEVEL of the Sysop --------------> /SYS:xxx
  83.        4) The FIRST & LAST NAME of the Sysop -----------> /NAM:xxx xxx
  84.        5) Any 'Switches' (As further explained) --------> [Options]
  85.  
  86.     MAILWAIT will then scan the message file for messages that qualify  for
  87.     processing (depends on your Switches).  If it encounters a message that
  88.     happens  to  be  addressed  to the REAL NAME  of  the  Sysop,  it  will
  89.     automatically change the message TO: -or- FROM: field to 'SYSOP'.
  90.  
  91.     After  scanning the message file it will then read each user record  to
  92.     see if any of the messages processed belong to the user.   If  MAILWAIT
  93.     sees a match,  it will then set the mailwaiting bit in the user file to
  94.     "1"  (on).   If MAILWAIT finds a user record whose  security  level  is
  95.     equal  to  -or-  greater  than the  security  level  specified  by  the
  96.     '/SYS:xxx'  parameter,  it will assume that it has  found  the  'SYSOP'
  97.     record  which  contains  the secret login name of the  Sysop.   If  the
  98.     message  scan indicated messages were to the Sysop,  it will  also  set
  99.     this mailwaiting bit.
  100.  
  101.     OPTIONAL SWITCHES:
  102.     ------------------
  103.        1) Don't Display Activity ------------------>: /DDA
  104.        2) Maintain Log File (MAILWAIT.LOG) -------->: /LOG
  105.        3) Match on 'NEW' AND 'OLD' Mail to USER --->: /OLD
  106.        4) Match on Mail 'TO' AND 'FROM' the USER -->: /FROM
  107.        5) Only Check Msgs not SCANNED by RBBSMAIL ->: /B4RMS
  108.        6) Totally RESET all USERS ----------------->: /RESET
  109.        7) Strip 'RE:' from Subject Field----------->: /KILLRE:
  110.  
  111.     Here is a brief description of each switch:
  112.  
  113.     /DDA      - Allows slightly faster program execution by not  displaying
  114.                 flashing user names and message data.
  115.  
  116.     /LOG     -  Will  create a file called MAILWAIT.LOG  which  contains  a
  117.                 summary of program activity and USERS who have NEW mail
  118.  
  119.     /OLD      - MAILWAIT  will not only set the mailwaiting bit  for  users
  120.                 who have NEW mail (mail where the rcvd field is blank)  but
  121.                 will  also  set it if the user has already read  it  (could
  122.                 encourage him/her to kill un-needed messages)
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                       PAGE: 2
  131.  
  132.  
  133.  
  134.                                 MAILWAIT Version 1.0
  135.  
  136.     /FROM     - MAILWAIT  will not only set the mailwaiting bit  for  users
  137.                 who  mail  is addressed TO,  but will also set  it  if  the
  138.                 mail  is  FROM  the  user also.  This  could  (again)  also
  139.                 encourage him/her to kill un-needed messages.
  140.  
  141.     /B4RMS    - Using  this  switch is recommended for RBBS  systems  using
  142.                 RBBSMAIL for FidoNet EchoMail processing.   This will  ONLY
  143.                 select  messages which HAVE NOT been marked by RBBSMAIL  as
  144.                 already  scanned  for  mail.   Therefore  if  only  20  NEW
  145.                 messages  have been received (out of say 300 messages),  it
  146.                 will  only  have to hash 20 messages in the  matching  user
  147.                 file.
  148.  
  149.                 IMPORTANT:   You  *MUST*  execute  MAILWAIT  *** BEFORE ***
  150.                 RBBSMAIL  scans  the message base.   RBBSMAIL will  mark  a
  151.                 message  as being scanned by changing the ':'  between  the
  152.                 minutes & seconds indicator (HH:MM:SS) to a period (.).
  153.  
  154.     /RESET    - This  switch is recommended when you are  first  installing
  155.                 MAILWAIT.   It will (prior to message/user hash) first zero
  156.                 out  all user records to 'no mail waiting'.   Then it  will
  157.                 continue   executing.    This  will  eliminate  users   who
  158.                 erroneously  notified  of  NEW  MAIL   even  though   their
  159.                 messages  have  already  been purged by  some  other  means
  160.                 (such as message purging).
  161.  
  162.     /KILLRE:  - Using  this  switch is recommended for RBBS  systems  using
  163.                 RBBSMAIL for FidoNet EchoMail processing.   This will clean
  164.                 up   the   FidoNet  subject  field   of   redundant   'RE:'
  165.                 characters  that  are created as part  of  FidoNet  message
  166.                 processing.  Example:
  167.  
  168.                 Subject Was:                    Subject (Cleaned up)
  169.                 --------------------------      ---------------------------
  170.                 (R) RE: MODEM FOR SALE          (R)MODEM FOR SALE
  171.                 (R)RE: RE:JOKES                 (R)JOKES
  172.                 (R)RE:RE: 386 4 SALE            (R)386 4 SALE
  173.  
  174.     NOTE:       This  switch  will  ONLY clean up  messages  based  on  the
  175.                 selection 'switches' you have specified.  Example:
  176.  
  177.                 If   your   message   base  has  300   messages   AND   you
  178.                 specified the /B4RMS   switch  and  you  received  20   NEW
  179.                 messages,    then ONLY   those   20   messages   will    be
  180.                 checked/corrected    for   the above   condition.     Using
  181.                 the  /RESET  switch  will check/correct  ALL  messages   in
  182.                 the message base.
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                       PAGE: 3
  197.  
  198.  
  199.  
  200.                                 MAILWAIT Version 1.0
  201.  
  202.     ----------------------------------------------------------------------
  203.  
  204.                                     SYNTAX
  205.  
  206.     MAILWAIT 1.0 (03/03/89)             INTERSTATE BBS NETWORK, Seattle WA
  207.                  (RBBS171D)             FidoNet (1:343/36)  (206)631-3231
  208.  
  209.     MAILWAIT /MSG:MsgFile /USR:UsrFile /SYS:xxx /NAM:Fnam Lnam [SWITCHES]
  210.     MAILWAIT /CMD:CommandFile [/MNT:MaintFile]
  211.  
  212.     /SYS:xxx     xxx = Security Level of SYSOP in USR File - (Not '0')
  213.     /NAM:Fn Ln   Fn = First Name and Ln = Last Name of SYSOP's COMMON NAME
  214.     /CMD:File    Commands MAILWAIT will Process (Sequentially).
  215.     /MNT:File    MAILWAIT will only Process Msg Files which have changed.
  216.  
  217.     SWITCHES:  1) Don't Display Activity ------------------>: /DDA
  218.                2) Maintain Log File (MAILWAIT.LOG) -------->: /LOG
  219.                3) Match on 'NEW' AND 'OLD' Mail to USER --->: /OLD
  220.                4) Match on Mail 'TO' AND 'FROM' the USER -->: /FROM
  221.                5) Only Check Msgs not SCANNED by RBBSMAIL ->: /B4RMS
  222.                6) Totally RESET all USERS ----------------->: /RESET
  223.                7) Strip 'RE:' from Subject Field----------->: /KILLRE:
  224.  
  225.     This program will reset the MAIL-WAITING Bit for the USERS File.
  226.     if Messages Exist.  Messages to '/NAM:Fn Ln' will be changed to 'SYSOP'
  227.  
  228.     ----------------------------------------------------------------------
  229.  
  230.                                COMMAND EXAMPLES
  231.  
  232.     MAILWAIT /MSG:HUMORM.DEF /USR:HUMORU.DEF /SYS:100 /NAM:MIKE ZAKHAROFF
  233.     (continued) /DDA /LOG /B4RMS /KILLRE:
  234.  
  235.          This  command  format  is recommended  for  RBBS  systems  running
  236.          RBBSMAIL, note that the security level of the Sysop (on MY system)
  237.          is  100,  and I am using my common name.   This command  will  not
  238.          display flashing user names and message records (/DDA), maintain a
  239.          MAILWAIT.LOG file (/LOG),  clean up those 'RE:'  characters in the
  240.          subject   field   (/KILLRE:),   change  any  messages   it   finds
  241.          addressed  to (or from) MIKE ZAKHAROFF to 'SYSOP',  and will  ONLY
  242.          process messages not already scanned by RBBSMAIL.
  243.  
  244.     MAILWAIT /MSG:HUMORM.DEF /USR:HUMORU.DEF /SYS:100 /NAM:MIKE ZAKHAROFF
  245.     (continued) /RESET /KILLRE:
  246.  
  247.          This  command  format  is recommended  for  RBBS  systems  running
  248.          RBBSMAIL,  who are first installing MAILWAIT.  This will reset the
  249.          user  file to 'no mailwaiting',  then will hash ALL  MESSAGES  for
  250.          ALL  USERS  (/RESET)  and will clean  up  those  'RE:'  characters
  251.          (/KILLRE:).   And will change any messages it finds  addressed  to
  252.          (or from) MIKE ZAKHAROFF to 'SYSOP'
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                                       PAGE: 4
  263.  
  264.  
  265.  
  266.                                 MAILWAIT Version 1.0
  267.  
  268.     MAILWAIT /MSG:MESSAGES /USR:USERS /SYS:100 /NAM:MIKE ZAKHAROFF /DDA
  269.     (continued) /LOG /OLD
  270.  
  271.          This  command format is recommended for RBBS  systems  maintaining
  272.          LOCAL conferences.  This will continually remind users of OLD  and
  273.          NEW  mail  that  they have in that conference.   Note  that  if  a
  274.          trusting user is acting as 'SYSOP' then you should put HIS name in
  275.          place of yours.
  276.  
  277.     MAILWAIT /MSG:MESSAGES /USR:USERS /SYS:100 /NAM:MIKE ZAKHAROFF /DDA
  278.     (continued) /OLD /FROM
  279.  
  280.          This  command format is recommended for RBBS  systems  maintaining
  281.          LOCAL conferences.  This will continually remind users of OLD  and
  282.          NEW  mail  that they have AND if mail was addressed TO  -or-  FROM
  283.          him/her in  that conference.  Note that this will  cause  'maximum
  284.          annoyance' to the user.
  285.  
  286.     MAILWAIT /MSG:MESSAGES /USR:USERS /SYS:100 /NAM:MIKE ZAKHAROFF /DDA 
  287.  
  288.          This  command format is recommended for RBBS  systems  maintaining
  289.          LOCAL  conferences.  This will ONLY notify users of NEW mail  that
  290.          they have in that conference.
  291.  
  292.     MAILWAIT /MSG:MESSAGES /USR:USERS /SYS:100 /NAM:MIKE ZAKHAROFF /DDA
  293.     (continued) /RESET
  294.  
  295.          This  command format is recommended for RBBS  systems  maintaining
  296.          LOCAL conferences,  who are first installing MAILWAIT.   This will
  297.          reset everything.
  298.  
  299.     ----------------------------------------------------------------------
  300.  
  301.                                  COMMAND FILES
  302.  
  303.     All of the above commands are very long,  and SHOULD be executed from a
  304.     MAILWAIT 'Command File'.  Here is an example of mine:
  305.  
  306.     /MSG:C:\RBBS\COMMM.DEF    /USR:C:\RBBS\COMMU.DEF    /SYS:100
  307.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  308.     /MSG:C:\RBBS\CONSULTM.DEF /USR:C:\RBBS\CONSULTU.DEF /SYS:100
  309.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  310.     /MSG:C:\RBBS\COOKINGM.DEF /USR:C:\RBBS\COOKINGU.DEF /SYS:100
  311.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  312.     /MSG:C:\RBBS\C_PRGMM.DEF  /USR:C:\RBBS\C_PRGMU.DEF  /SYS:100
  313.     (contunued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  314.     /MSG:C:\RBBS\FEMINM.DEF   /USR:C:\RBBS\FEMINU.DEF   /SYS:100
  315.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  316.     /MSG:C:\RBBS\FORSALEM.DEF /USR:C:\RBBS\FORSALEU.DEF /SYS:100
  317.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  318.     /MSG:C:\RBBS\HUMORM.DEF   /USR:C:\RBBS\HUMORU.DEF   /SYS:100
  319.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  320.     /MSG:C:\RBBS\OS2M.DEF     /USR:C:\RBBS\OS2U.DEF     /SYS:100
  321.     (continued) /NAM:MIKE ZAKHAROFF /OLD /DDA /B4RMS /LOG /KILLRE:
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                       PAGE: 5
  329.  
  330.  
  331.  
  332.                                 MAILWAIT Version 1.0
  333.  
  334.     The SYNTAX to execute from a command file is simple:
  335.  
  336.     MAILWAIT /CMD:MAILWAIT.CMD <return>
  337.  
  338.          MAILWAIT will then execute each one of those lines located  within
  339.          the  command file just as if you had executed then  directly  from
  340.          DOS.   This  will keep your front-end or your  system  maintenance
  341.          batch file clean and organized.
  342.  
  343.     NOTE: The above example is for FidoNet message processing, also I would
  344.     have specified a 'Maintenance File' also.... Read on.
  345.     ----------------------------------------------------------------------
  346.  
  347.                       MAINTENANCE COMMAND & FILE PURPOSE
  348.  
  349.     If  you  are  going to execute MAILWAIT from a command  file  (and  you
  350.     should) you should *ALSO* specify the 'MNT:' parameter.   Here's how it
  351.     works:
  352.  
  353.     Every  time  you  execute MAILWAIT using the 'MNT:'  parameter  with  a
  354.     maintenance file,  MAILWAIT will first check to see if record number  1
  355.     of the message base has changed (i.e.: # of Messages,  Record # of next
  356.     message,  etc.).  If it hasn't then it will skip processing.  This will
  357.     save considerable time if no users have entered messages in days.
  358.  
  359.     Here is an example of the 'MAILWAIT.MNT' maintenance file created:
  360.  
  361.     C:\RBBS\COMMM.DEF, 121 , 5 , 862 , 1024 
  362.     C:\RBBS\CONSULTM.DEF, 87 , 5 , 642 , 1024 
  363.     C:\RBBS\COOKINGM.DEF, 170 , 5 , 1241 , 1500 
  364.     C:\RBBS\C_PRGMM.DEF, 206 , 5 , 1690 , 2000 
  365.     C:\RBBS\FEMINM.DEF, 132 , 5 , 1017 , 1200 
  366.     C:\RBBS\FORSALEM.DEF, 267 , 5 , 1690 , 2000 
  367.     C:\RBBS\HUMORM.DEF, 153 , 5 , 859 , 1024 
  368.     C:\RBBS\OS2M.DEF, 110 , 5 , 860 , 1024 
  369.  
  370.     MAILWAIT will check & update this file EVERY TIME it is executed.
  371.  
  372.     SYNTAX:
  373.  
  374.     MAILWAIT /CMD:MAILWAIT.CMD /MNT:MAILWAIT.MNT <return>
  375.  
  376.     NOTE: This is the **Optimum** method of MAILWAIT operation.
  377.  
  378.     ----------------------------------------------------------------------
  379.  
  380.                                  INSTALLATION
  381.  
  382.     First, update the supplied 'MAILWAIT.CMD' command file and configure it
  383.     to RESET your USERS file mailwait bit (/RESET).
  384.  
  385.     Next,  using the following batch file excerpt as a guide, test MAILWAIT
  386.     to make sure it works as stated.  It is highly recommended that you set
  387.     up  some  sort of 'TEST-JIG'  batch file to convince yourself  that  it
  388.     works.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                                       PAGE: 6
  395.  
  396.  
  397.  
  398.                                 MAILWAIT Version 1.0
  399.  
  400.     WARNING: Do  not entrust your precious message/user bases to my  meager
  401.     programming  skills!  Try this on a backup copy  of  your  message/user
  402.     bases first.   If it mucks up your message bases,  don't come crying to
  403.     me!
  404.  
  405.     Next, Modify your Binkley, Seadog, or other front-end mailer  or system
  406.     maintenance batch file.   Here is an example of mine.   Note that  this
  407.     can  take on many different forms AND this is just a 'PORTION'  of  the
  408.     batch file!
  409.  
  410.     ----------------------------------------------------------------------
  411.  
  412.                       RBBSMAIL FIDONET BATCH FILE EXAMPLE
  413.  
  414.     :RECMAIL
  415.            confMail import areas.bbs -F confmail.out -a pkxarc
  416.            confMail maint -F confmail.out
  417.            rbbsmail toss /f:arearbbs.bbs /l /tu /s
  418.            Msgecho /cfg:Msgecho.cfg
  419.            IF Not Exist E:\ECHOS\*.msg Goto SCAN
  420.  
  421.            rbbsmail toss /f:arearbbs.bbs /l /tu /s
  422.            If Exist E:\ECHOS\*.msg confmail renum -S -Q -E -Z -R E:\ECHOS
  423.            If Exist E:\ECHOS\*.msg Msgecho /cfg:Msgecho.cfg
  424.            If Exist E:\ECHOS\*.msg rbbsmail toss /f:arearbbs.bbs /l /tu /s
  425.            Msgecho /cfg:Msgecho.cfg
  426.  
  427.     :SCAN
  428.     --> 1  MAILWAIT /CMD:MAILWAIT.CMD /MNT:MAILWAIT.MNT
  429.            rbbsmail /f:arearbbs.bbs scan /l /o
  430.            Goto START
  431.  
  432.     NOTE:  Because I am using the '/B4RMS' switch, notice that the MAILWAIT
  433.            command is *** BEFORE *** the RBBSMAIL SCAN command!
  434.  
  435.             If you are using RBBSMAIL and are NOT using MSGECHO (as in  the
  436.            above  batch file),  you can receive it from my board (I am  the
  437.            Author).  MSGECHO will totally automate message base maintenance
  438.            if you are running RBBSMAIL.
  439.  
  440.     ----------------------------------------------------------------------
  441.  
  442.                                   WARRANTIES
  443.  
  444.     I hereby warrant that MAILWAIT could (without warning) muck up all your
  445.     message/users files to the point of non-use at anytime!  Therefore  the
  446.     use of this program is solely at your own risk!   I also warrant that I
  447.     may NEVER update this program past this initial release.
  448.  
  449.     ----------------------------------------------------------------------
  450.  
  451.                                     EPILOG
  452.  
  453.     I  would like to know what you think of this program!   Call my BBS  or
  454.     drop me Netmail or catch me in the various ECHOS that I participate in. 
  455.     If I don't get any feedback,  how am I suppose to know who is using  it
  456.     and what incentive do I have to improve it?  Meanwhile, happy BBSing!
  457.  
  458.  
  459.  
  460.                                       PAGE: 7
  461.  
  462.  
  463.